// @Author: Duanxj
// @Description:
// @Version: 1.0.0
// @Date: 2021/4/6
// @Time: 15:56

package untils

import (
	"math/rand"
	"time"
)

// 随机产生字符串
func GetRandomString(l int) string {
	str := "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"
	rand.Seed(time.Now().UnixNano())
	result := []byte{}
	for i := 0; i < l; i++ {
		result = append(result, str[rand.Intn(len(str))])
	}
	return string(result)
}
